﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Prism.Core;
using Prism.Core.WPF;
using Prism.Games.GalEngine.Scripts.Parser.Input;

namespace Prism.Games.GalEngine.Scripts.Parser
{
    [Serializable]
    public class GalSaveData : Prism.ComponentModel.NotifyPropertyChangedBase, IPostionMarked
    {
        public GalSaveData()
        {
            this.Roles = new Data.ResourceCollection.RoleCollection();
        }

        private DateTime createTime;
        public DateTime CreateTime { get { return this.createTime; } set { this.createTime = value; this.OnPropertyChanged("CreateTime"); } }

        private ParserState state;
        public ParserState State { get { return this.state; } set { this.state = value; this.OnPropertyChanged("State"); } }

        private string gameName;
        public string GameName { get { return this.gameName; } set { this.gameName = value; this.OnPropertyChanged("GameName"); } }

        private string version;
        public string Version { get { return this.version; } set { this.version = value; this.OnPropertyChanged("Version"); } }

        private string comment;

        public string Comment
        {
            get { return comment; }
            set { comment = value; this.OnPropertyChanged("Comment"); }
        }

        private byte[] shotCut;

        public System.Windows.Media.Imaging.BitmapSource ShotCut
        {
            get { return shotCut.CreateBitmapImage(); }
            set { this.shotCut = value.GetImageArray(); this.OnPropertyChanged("ShotCut"); }
        }

        private bool? canWrite;

        public bool? CanWrite
        {
            get { return canWrite; }
            set { canWrite = value; this.OnPropertyChanged("CanWrite"); }
        }

        private Prism.Games.GalEngine.Scripts.Data.ResourceCollection.RoleCollection roles;
        public Prism.Games.GalEngine.Scripts.Data.ResourceCollection.RoleCollection Roles { get { return this.roles; } set { this.roles = value; this.OnPropertyChanged("Roles"); } }

        private int postion;
        public int Postion
        {
            get { return this.postion; }
            set { this.postion = value; this.OnPropertyChanged("Postion"); }
        }
    }
}
